In a digital image, clipping appears as a uniform area. Clipping usually detracts from the quality of the image. A pixel can be clipped in only one color channel, or simultaneously in multiple or all color channels.
Clipping can result from a number of causes. Numerical clipping occurs when the value of the pixel reaches a limit of an allowable range. In an 8-bit per pixel per color channel system, numerically clipped regions appear as pixels having a value of 0 or 255. Clipping can occur from saturation, meaning that at some point in the image processing path, the pixel value (in either analog or digital form) reaches a limiting value. For example, if photosites of an imaging sensor are saturated, then the digital value from the A/D converter will be some maximum value.
It is useful to know if a digital image has clipped pixel values, and where those pixels are located. When manipulating an image, it is especially easy to produce visually objectionable artifacts corresponding to clipped pixels of the digital image.
In U.S. Pat. No. 6,377,269, which issued in the names of Kay and Bradenberg, a method is described for generating image masks. The method determines whether an image contains clipped pixel components, then depending on the results either applies a separate background compensation for each of several images, or applies the same background compensation for each of several images. This method does not explain how to detect whether the image contains a clipped pixel component. U.S. Pat. No. 6,476,865, which issued in the names of Gindele and Gallagher, describes an imaging device. A different interpolation method is used for photosites that are clipped than for non-clipped photosites. Clipped photosites are defined as those that produce the maximum A/D converter value. In addition, EP1186163 describes an imaging system where thresholds are used to identify saturated pixels, which receive different treatment during interpolation.
The prior art methods of detecting clipped or saturated pixels use a simple thresholding operation. However, it is incorrect to assume that the detection of clipped pixels is a simple problem that can be solved with only a thresholding operation. It is easy to find image examples where a simple threshold cannot adequately distinguish the clipped pixels from the non-clipped pixels. For simplicity, consider clipping on the high end of an 8 bit per pixel per color channel digital image. Many images have apparently clipped regions of pixels with a value below 255 (e.g. 251, or 248, or 253). Further complicating the matter is that within the same image and color channel, an apparently non-clipped region of pixels may have pixel values larger than those of the clipped region. Thus, none of the prior art methods of detecting clipped pixels are adequate, because either some clipped pixels would be misclassified as non-clipped, or some non-clipped pixels would be misclassified as clipped.
It is important to realize that an image pixel can become clipped during any number of places throughout an image processing path (the series of image transforms, either analog or digital that process the image.) For example, if clipping occurs electronically at the image sensor, then the A/D converter will produce a maximum attainable digital value for the pixel. However, clipping can occur later during the image processing path, such as when applying color transforms or look-up-tables (LUTs). Once a region of pixels is clipped, subsequent image transforms of the image processing path can re-arrange the pixel values so that the value of the clipped pixels can depend on, for instance, the color of the pixel. Thus, clipping can occur at many different points, and a simple threshold is inadequate to detect clipped pixels.
Thus there exists a need for an improved method of detecting clipped pixels in digital images.